Skip to content

Conversation

yfodil
Copy link
Contributor

@yfodil yfodil commented Jun 5, 2025

Import can be done by identity now:

import {
  to       = scaleway_vpc.main
  identity = {
    id     = "11111111-1111-1111-1111-111111111111"
    region = "fr-par"
  }
}


resource "scaleway_vpc" "main" {}

@yfodil yfodil self-assigned this Jun 5, 2025
@yfodil yfodil added enhancement vpc Virtual Private Cloud (VPC) issues, bugs and feature requests labels Jun 5, 2025
@@ -21,7 +23,56 @@ func ResourceVPC() *schema.Resource {
UpdateContext: ResourceVPCUpdate,
DeleteContext: ResourceVPCDelete,
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
StateContext: func(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a way to make a global function, since it'll basically be the same across all resources, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement vpc Virtual Private Cloud (VPC) issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants